from data_counts_gai import *
from process_poi import *
from process_weather import *
from combine import *
import os

#格子数，经纬度范围
num = 100
max_longitude = 104.589952
min_longitude = 103.259070
max_latitude = 31.09167
min_latitude = 30.17542
counts_scalar = 1397
longitude_unit = (max_longitude - min_longitude) / num
latitude_unit = (max_latitude - min_latitude) / num
#时间块长度，单位分钟
interval = 60
month_length = 30
time_chunk_size = 6
#是否标准化
scala = False
file_path = 'D:/厦门市出租车数据预处理/成都预处理/chengdudata/'
save_path = 'D:/厦门市出租车数据预处理/成都预处理/clean_data/'

if not os.path.exists(save_path+str(interval)+'_counts_data_gai_part1'):
    read_data(file_path, save_path, num, min_longitude, min_latitude, longitude_unit, latitude_unit, interval)
if not os.path.exists(save_path+str(interval)+'_counts_data_gai_final'):
    clean_data(save_path, interval, num, month_length, time_chunk_size,scala)
if not os.path.exists(save_path+'POI_data.csv'):
    process_poi(file_path, save_path,num, max_longitude, min_longitude, max_latitude, min_latitude,
                longitude_unit, latitude_unit)
if not os.path.exists(save_path + 'weather_data.csv'):
    process_weather(file_path, save_path, month_length)
if not os.path.exists(save_path + str(interval) + '_chengdu_data_gai'):
    combine(save_path,interval)


